package com.engr.lyx.blog.biz.controller;

import com.engr.lyx.blog.biz.service.MenuService;
import com.engr.lyx.common.annotation.FreeAccess;
import com.engr.lyx.common.base.ResultBody;
import com.engr.lyx.common.utils.ResultUtils;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: blog
 * @description: 菜单
 * @author: lyx
 * @create: 2018-11-03
 **/
@RestController
@RequestMapping(value = "/api/menu",name = "菜单")
public class MenuController{

    @Autowired
    private MenuService menuService;


    @FreeAccess
    @GetMapping("/list")
    @ApiOperation(value = "菜单-列表", notes = "菜单-列表")
    public ResultBody selectMenuList(){

        return ResultUtils.success(menuService.findMenuList());
    }

}
